<?php

namespace app\admin\controller\user;

use app\admin\{
    controller\Controllers,
    service\user\Address as AddressService
};

class Address extends Controllers
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index(AddressService $service)
    {
        $get = $this->request->get();
        $this->validate($get, 'app\admin\validate\user\Address.index');
        $list = $service->indexPaginate($get);
        $this->assign([
            'get' => $get,
            'list' => $list,
            'page' => $list->render(),
            'count' => $list->total()
        ]);
        return $this->fetch('user/address/index');
    }

}
